"""
本文件用于定义实体类
"""
import numpy as np
import pandas as pd

class unit:

    def __init__(self,type,name):
        self.type=type # 类型，飞机，导弹车,防空炮。。。
        self.name=name
        self.武器列表 = self.Get_Weapon_Inform()
        self.载荷=pd.Series(0,index=self.武器列表.index)  # 武器类型，数量
        self.速度=[0,0,0]     # 矢量速度


    def Get_Weapon_Inform(self):
        W_file=open('Configure/武器参数.txt')
        W_lable=W_file.readline().split()

        W_lable.remove(W_lable[0])
        W_type=[]
        W_para=[]
        for i in W_file:
            W=i.split()
            W_type.append(W[0])
            W.remove(W[0])
            W_para.append(W)

        return pd.DataFrame(W_para, index=W_type, columns=W_lable)

class observation:
    pass    # TODO (zrc) 打算将observation做成是一类，固定下来





